.message {
    padding: 10px 15px;
    overflow-y: hidden;
}

.message li {
    margin-bottom: 15px;
}

.message .time {
    margin: 7px 0;
    text-align: center;
}

.message .time>span {
    display: inline-block;
    padding: 0 18px;
    font-size: 12px;
    color: #fff;
    border-radius: 2px;
    background-color: #dcdcdc;
}

.message .avatar {
    float: left;
    margin: 0 10px 0 0;
    border-radius: 3px;
}

.message .text {
    display: inline-block;
    position: relative;
    padding: 0 10px;
    max-width: calc(100% - 40px);
    min-height: 30px;
    line-height: 2.5;
    font-size: 12px;
    text-align: left;
    word-break: break-all;
    background-color: #fafafa;
    border-radius: 4px;
}

.message .text:before {
    content: " ";
    position: absolute;
    top: 9px;
    right: 100%;
    border: 6px solid transparent;
    border-right-color: #fafafa;
}

.message .self {
    text-align: right;
}

.message .self .avatar {
    float: right;
    margin: 0 0 0 10px;
}

.message .self .text {
    background-color: #b2e281;
}

.message .self .text:before {
    right: inherit;
    left: 100%;
    border-right-color: transparent;
    border-left-color: #b2e281;
}